From 21e5bcf22ab1a9f08c63e2a0212219d7482f77c1 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 10 Mar 2021 18:42:25 +0100
Subject: [PATCH] 00_header: add GRUB_COLOR_* variables
---
 util/grub-mkconfig.in    | 2 ++
 util/grub.d/00_header.in | 8 ++++++++
 2 files changed, 10 insertions(+)

diff -Nuar a/util/grub-mkconfig.in b/util/grub-mkconfig.in
--- a/util/grub-mkconfig.in	2021-11-05 18:53:16.118969000 +0300
+++ b/util/grub-mkconfig.in	2021-11-05 20:03:25.603871159 +0300
@@ -243,6 +243,8 @@
   GRUB_BACKGROUND \
   GRUB_THEME \
   GRUB_GFXPAYLOAD_LINUX \
+  GRUB_COLOR_NORMAL \
+  GRUB_COLOR_HIGHLIGHT \
   GRUB_DISABLE_OS_PROBER \
   GRUB_INIT_TUNE \
   GRUB_SAVEDEFAULT \
diff -Nuar a/util/grub.d/00_header.in b/util/grub.d/00_header.in
--- a/util/grub.d/00_header.in	2021-11-05 18:53:15.816969000 +0300
+++ b/util/grub.d/00_header.in	2021-11-05 20:06:00.698859968 +0300
@@ -125,6 +125,14 @@

 EOF

+if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then
+    cat << EOF
+set menu_color_normal=$GRUB_COLOR_NORMAL
+set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT
+
+EOF
+fi
+
 serial=0;
 gfxterm=0;
 for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do

